// JavaScript Document
var GameObject = Class.extend({
	x: 0,
	y: 0,
	
	init: function(x, y) {
		this.x = x;
		this.y = y;
	},
	setPos: function(x, y) {
		this.x = x;
		this.y = y;
	},
	draw: function() {
		try {
			ctx.drawImage(images["bombSprite"], 32, 0, grid, grid, this.x, this.y, grid, grid);
		} catch(e) {
			alert(e);
		}
	}
});

var Bomb = GameObject.extend({
	time: 3, // time in seconds it takes the bomb to explode
	assignedKey: null,
	
	init: function() {
	
	},
	setPos: function(x_abs, y_abs) {
		this._super(x_abs * grid, y_abs * grid);
	},
	getPosX: function() {
		return Math.ceil(this.x / grid);
	},
	getPosY: function() {
		return Math.ceil(this.y / grid);
	},
	assignKey: function(key){
		this.assignedKey = key;
	},

	update: function() {

	}
});